package com.it.travel.controller;

import com.it.travel.service.StoryService;
import com.it.travel.vo.Params.RouteParams;
import com.it.travel.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/story")
@CrossOrigin
public class StoryController {

    @Resource
    private StoryService storyService;

    @GetMapping("{num}")
    public Result<?> getStoryInfo(@PathVariable("num") Integer num) {
        Result<?> result = storyService.getStoryInfo(num);
        return result;
    }

    @GetMapping("detail/{id}")
    public Result<?> getStoryDetail(@PathVariable("id") Integer id) {
        Result<?> result = storyService.getStoryDetail(id);
        return result;

    }

}
